package com.qf.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * --- 天道酬勤 ---
 *
 * @author QiuShiju
 * @date 2025/9/25
 * @desc ORM：对象关系映射,要求实体类和数据库表的字段要对应上
 */
@Data
public class User implements Serializable {
    private Integer id;
    private String username;
    private String password;
    private String phone;
    private String avatar;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime; // 数据库的create_time字段,这里转驼峰
    private Double money;
    private Integer sex;
}
